package com.bolt.report.engine.model;

import com.bolt.common.collection.IteratorUtil;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class GroupCell implements Serializable {

    private List<Cell> groupCell;

    private List<Cell> summaryCell;

    public GroupCell() {
        this.groupCell = new ArrayList<>();
        this.summaryCell = new ArrayList<>();
    }

    public void addGroupCell(Cell cell) {
        this.groupCell.add(cell);
    }

    public void addSummaryCell(Cell cell) {
        this.summaryCell.add(cell);
    }

    public boolean haveGroupCell() {
        return IteratorUtil.isNotEmpty(this.getGroupCell());
    }

    public boolean haveSummary() {
        return IteratorUtil.isNotEmpty(this.summaryCell);
    }

    public List<Cell> getGroupCell() {
        return groupCell;
    }

    public void setGroupCell(List<Cell> groupCell) {
        this.groupCell = groupCell;
    }

    public List<Cell> getSummaryCell() {
        return summaryCell;
    }

    public void setSummaryCell(List<Cell> summaryCell) {
        this.summaryCell = summaryCell;
    }
}